#include <stdio.h>
#include "charop.h"

int main()
{
	char str[50];
	int i = 0;
	char c;

	scanf("%s", str);

	while ((c = str[i++]) != '\0') {
		if (is_upper(c)) {
			printf("%c", to_lower(c));
		} else if (is_lower(c)) {
			printf("%c", to_upper(c));
		} else if (is_digit(c)) {
			printf("%d", to_number(c));
		}
	}
	printf("\n");

	return 0;
}
